home *** CD-ROM | disk | FTP | other *** search
- on placedownmenubutton buttonname, h, v, popnum, offset
- global popposition, buttondata
- set buttondata to buttonname & "," & h & "," & v & "," & popnum & "," & offset
- puppetSprite(21, 1)
- set the type of sprite 21 to 1
- set the ink of sprite 21 to 0
- set the foreColor of sprite 21 to 255
- set the backColor of sprite 21 to 0
- set castname to buttonname & ",down"
- set the castNum of sprite 21 to the number of member castname
- set the locH of sprite 21 to h + offset
- set the locV of sprite 21 to v
- updateStage()
- showpopmenu(buttonname, h, v, offset)
- set popposition to getpopposition(buttonname)
- end
-
- on showpopmenu buttonname, h, v, offset
- global popposition, poponoff
- set poponoff to 1
- puppetSprite(22, 1)
- set the type of sprite 22 to 1
- set the ink of sprite 22 to 0
- set the foreColor of sprite 22 to 255
- set the backColor of sprite 22 to 0
- set castname to buttonname & ",pop"
- set the castNum of sprite 22 to the number of member castname
- set the locH of sprite 22 to h + offset
- set the locV of sprite 22 to v + 22
- updateStage()
- end
-
- on checkpopmenu
- global popposition, buttondata, poponoff
- if buttondata = 0 then
- exit
- end if
- set buttonname to item 1 of buttondata
- set h to value(item 2 of buttondata)
- set v to value(item 3 of buttondata)
- set offset to value(item 5 of buttondata)
- set mh to mouseH() - offset
- set mv to mouseV()
- if (mv >= value(word 1 of item 1 of popposition)) and (mv <= word 2 of item 1 of popposition) then
- set n to 1
- set voffset to value(word 1 of item 1 of popposition) - 1
- else
- if (mv >= value(word 1 of item 2 of popposition)) and (mv <= word 2 of item 2 of popposition) then
- set n to 2
- set voffset to value(word 1 of item 2 of popposition) - 1
- else
- if (mv >= value(word 1 of item 3 of popposition)) and (mv <= word 2 of item 3 of popposition) then
- set n to 3
- set voffset to value(word 1 of item 3 of popposition) - 1
- else
- if (mv >= value(word 1 of item 4 of popposition)) and (mv <= word 2 of item 4 of popposition) then
- set n to 4
- set voffset to value(word 1 of item 4 of popposition) - 1
- else
- if (mv >= value(word 1 of item 5 of popposition)) and (mv <= word 2 of item 5 of popposition) then
- set n to 5
- set voffset to value(word 1 of item 5 of popposition) - 1
- else
- puppetSprite(23, 0)
- updateStage()
- exit
- end if
- end if
- end if
- end if
- end if
- puppetSprite(23, 1)
- set the type of sprite 23 to 1
- set the ink of sprite 23 to 0
- set the foreColor of sprite 23 to 255
- set the backColor of sprite 23 to 0
- set castname to buttonname & ",pop,down," & n
- set the castNum of sprite 23 to the number of member castname
- set the locH of sprite 23 to h + offset
- set the locV of sprite 23 to v + voffset
- updateStage()
- end
-
- on eracemenudownbutton
- global poponoff
- set poponoff to 0
- puppetSprite(21, 0)
- puppetSprite(22, 0)
- puppetSprite(23, 0)
- puppetSprite(24, 0)
- updateStage()
- end
-